package com.zg.nacos.domain.req;

import com.zg.common.core.req.EditReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/28 9:49
 */
@Data
@ApiModel
public class MicroNacosEditReq extends EditReq {

    @ApiModelProperty(value = "命名空间", required = true)
    @NotEmpty(message = "命名空间不能为空")
    private String namespace;

    @ApiModelProperty(value = "服务名称", required = true)
    @NotEmpty(message = "服务名称不能为空")
    private String serviceName;

    @ApiModelProperty(value = "服务编码", required = true)
    @NotEmpty(message = "服务编码不能为空")
    private String serviceCode;

    @ApiModelProperty(value = "端口", required = true)
   // @NotNull(message = "端口不能为空")
    private Integer port;

    @ApiModelProperty(value = "IP地址", required = true)
    @NotEmpty(message = "IP地址不能为空")
    private String ip;

    @ApiModelProperty(value = "健康检查URL", required = true)
    private String healthCheckUrl;

    @ApiModelProperty(value = "激活状态(0-待运行，1-运行中，2-已下线)", required = true)
    private Integer activeStatus;

    @ApiModelProperty(value = "是否自动注册(0-否，1-是)", required = true)
    private Integer enAuto;

    @ApiModelProperty(value = "备注")
    private String intro;
}
